let fold

const el = document.getElementById('container');
const stage = new Konva.Stage({
  container: el,
  width: 800,
  height: 300,
});
const layer = new Konva.Layer();
stage.add(layer);

const axisX = new Konva.Arrow({
  points: [10, 290, 796, 290],
  fill: 'white',
  stroke: 'white',
  strokeWidth: 4
});
layer.add(axisX);

const axisY = new Konva.Arrow({
  points: [10, 292, 10, 6],
  fill: 'white',
  stroke: 'white',
  strokeWidth: 4
});
layer.add(axisY);

const lines = [
  {
    shadowColor: 'red',
  },
  {
    shadowColor: '#2fa4fa'
  }
];

lines.forEach(item => {
  const line = new Konva.Line({
    points: getRandonPoints(),
    stroke: 'white',
    strokeWidth: 2,
    shadowColor: item.shadowColor,
    shadowBlur: 2
  });
  item.unit = line;
  layer.add(line);
});